<style lang="less" scoped>

  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }

  .f-w70 {
    width: 70%;
  }
</style>

<template>
  <section>
    <!--工具条-->
    <search-bar more-display>
      <el-row>
        <el-col :span="8">
          <el-form-item label="名称">
            <el-input  v-model="searchName" placeholder="名称"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="范围类型">
            <el-select  v-model="cargoTypeValue" placeholder="请选择">
              <el-option
                v-for="item in cargoType"
                :label="item.cnDictValname"
                :key="item.dictVal"
                :value="item.dictVal">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="状态">
            <el-select  v-model="isStartValue" placeholder="请选择">
              <el-option
                v-for="(item,index) in isStart"
                :label="item.cnDictValname"
                :value="item.dictVal" :key="index">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="配载中心">
            <el-cascader
              placeholder="请选择配载中心"
              :options="$store.state.initOrganizations"
              :props="{label: 'name',value: 'id'}"
              change-on-select
              v-model="searchStowageCoreCenter2" style="width: 375px"
            ></el-cascader>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="调度中心">
            <el-cascader
              placeholder="请选择调度中心"
              :options="$store.state.initOrganizations"
              :props="{label: 'name',value: 'id'}"
              change-on-select
              v-model="searchBarOrganization2" style="width: 375px"
            ></el-cascader>
          </el-form-item>
        </el-col>
      </el-row>
    </search-bar>

    <!-- 操作 -->
    <el-col :span="24" style="margin-bottom: 10px">
      <el-button type="primary" @click="handleAdd">新增</el-button>
      <el-button type="success" @click="batchStart">启用</el-button>
      <el-button type="warning" @click="batchStop">停用</el-button>
      <el-button type="danger" @click="batchDel">删除</el-button>
      <el-button type="primary" @click="myResert" style="float: right">重置</el-button>
      <el-button type="primary" @click="mySearch" style="float: right">查询</el-button>
    </el-col>

    <!--列表-->
    <el-table :data="tableData" highlight-current-row border max-height="650"
              @selection-change="selsChange" v-loading="listLoading" style="width: 100%;">
      <el-table-column type="selection" width="45">
      </el-table-column>
      <el-table-column prop="isStartName" label="账户状态" width="80" >
      </el-table-column>
      <el-table-column prop="name" label="名称" width="150" >
      </el-table-column>

      <el-table-column prop="typeName" label="任务类型" width="150" >
      </el-table-column>
      <el-table-column prop="includeServiceName" label="服务范围包含" width="180" >
      </el-table-column>
      <el-table-column prop="notIncludeServiceName" label="服务范围不包含" width="220" >
      </el-table-column>
      <el-table-column prop="keyword" label="关键字" width="180" >
      </el-table-column>
      <el-table-column prop="stowageCoreName" label="配载中心" width="200" >
      </el-table-column>
      <el-table-column prop="organizationName" label="调载中心" width="200" >
      </el-table-column>
      <el-table-column label="操作" width="220">
        <template slot-scope="scope">
          <el-button type="success" v-if="scope.row.isStart===111002002"
                     @click="handleStart(scope.$index, scope.row)">启用
          </el-button>
          <el-button type="warning" v-if="scope.row.isStart===111002001"
                     @click="handleStop(scope.$index, scope.row)">停用
          </el-button>
          <el-button  type="primary" @click="getEditBYId(scope.$index, scope.row)">编辑 </el-button>
          <el-button type="danger"  @click="handleDel(scope.$index, scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!--工具条-->
    <el-col :span="24" class="toolbar">
      <el-pagination
        :current-page="currentPage"
        :page-size="pageSize"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        layout="total,sizes,prev, pager, next, jumper"
        :total="total" style="float: right">
      </el-pagination>
    </el-col>

    <!-- 弹窗 -->
    <el-dialog :title="dialogTitle" size="tiny" :visible.sync="myMarkCargoVisible" :close-on-click-modal="false">
      <el-form :model="myMarkCargo" :rules="rules" label-width="100px" ref="myMarkCargo">
        <el-form-item label="名称" prop="name">
          <el-input class="f-w70" v-model="myMarkCargo.name" auto-complete="off"></el-input>
        </el-form-item>

        <el-form-item label="范围类型" prop="type">
          <el-radio-group v-model="myMarkCargo.type">
            <el-radio class="radio" :label="105003001">提货范围</el-radio>
            <el-radio class="radio" :label="105003002">送货范围</el-radio>
          </el-radio-group>
        </el-form-item>

        <el-form-item label="接驳类型" prop="connectionType">
          <!--<el-radio-group v-model="myMarkCargo.connectionType">-->
          <!--<el-radio class="connectionTyperadio" :label="105003001" :value="起运地"></el-radio>-->
          <!--<el-radio class="connectionTyperadio" :label="105003002" :value="目的地"></el-radio>-->
          <!--</el-radio-group>-->
          <el-select v-model="myMarkCargo.connectionType" placeholder="请选择接驳类型">
            <el-option
              v-for="(ct,index) in $store.getters.CONNECTION_TYPE"
              :label="ct.cnDictValname"
              :value="ct.dictVal" :key="index">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item>
          <el-button  type="primary" @click="addIncludeArea()" style="float: right">新增</el-button>
        </el-form-item>

        <el-form-item label="范围">
          <el-table
            :data="tableDataGO"
            style="width: 400%">
            <el-table-column
              prop="province"
              label="包含省"
              width="150">
            </el-table-column>
            <el-table-column
              prop="city"
              label="包含市"
              width="150">
            </el-table-column>
            <el-table-column
              prop="county"
              label="包含区">
            </el-table-column>
            <el-table-column
              prop="town"
              label="包含乡镇街道">
            </el-table-column>
            <el-table-column
              prop="notincludeProvince"
              label="不包含省"
              width="150">
            </el-table-column>
            <el-table-column
              prop="notincludeCity"
              label="不包含市"
              width="150">
            </el-table-column>
            <el-table-column
              width="180"
              prop="notincludeCounty"
              label="不包含区">
            </el-table-column>
            <el-table-column
              width="180"
              prop="notincludeTown"
              label="不包含乡镇街道">
            </el-table-column>
            <el-table-column label="操作" width="150">
              <template slot-scope="scope">
                <el-button  type="primary"
                           @click="getEditAddressBYId(scope.$index, scope.row)">编辑
                </el-button>
                <el-button type="danger"
                           @click.native.prevent="handleAddressDel(scope.$index, tableDataGO)"
                >删除
                </el-button>
              </template>
            </el-table-column>
          </el-table>

        </el-form-item>
        <el-form-item label="关键字" prop="keyword">
          <el-input class="f-w70" v-model="myMarkCargo.keyword" auto-complete="off"
                    placeholder="请输入关键字"></el-input>
        </el-form-item>

        <el-form-item label="排序" prop="sorts">
          <el-input class="f-w70" v-model="myMarkCargo.sorts" auto-complete="off"
                    placeholder="请输入排序号"></el-input>
        </el-form-item>

        <el-form-item label="配载中心" :rules="[{required: true}]">
          <el-cascader
            class="f-w70"
            placeholder="请选择配载中心"
            :options="$store.state.initOrganizations"
            :props="{label: 'name',value: 'id'}"
            change-on-select
            v-model="stowageCoreCenter2"
          ></el-cascader>

        </el-form-item>

        <el-form-item label="调度中心" :rules="[{required: true}]">
          <el-cascader
            class="f-w70"
            placeholder="请选择调度中心"
            :options="$store.state.initOrganizations"
            :props="{label: 'name',value: 'id'}"
            v-model="controlCenter2"
            change-on-select>
          </el-cascader>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
                    <textarea class="f-w70" v-model="myMarkCargo.remark" rows="5" cols="20" auto-complete="off"
                              placeholder="请输入备注信息"></textarea>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancelAddress">取消</el-button>
        <el-button type="primary" @click.native="handleSubmit" :loading="submitLoading">提交</el-button>
      </div>
    </el-dialog>

    <!-- 地址弹窗 -->
    <el-dialog :title="includeTitle"  :visible.sync="myIncludeAreaVisible" :close-on-click-modal="false">
      <el-form :model="myIncludeArea" label-width="90px" ref="myIncludeArea">
        <el-form-item label="包含省">
          <el-select clearable  v-model="myIncludeArea.province" @change="myProvince"
                     @clear="myProvinceClear"
                     value-key="id"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in includeProvinceValue"
              :label="item.name"
              :value="item" :key="index">
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="包含市">
          <el-select clearable  v-model="myIncludeArea.provinceAndCity"
                     value-key="id"
                     @clear="myIncludeProvinceClear" @change="myIncludeProvince" placeholder="请选择省">
            <el-option
              v-for="(item,index) in provinceAndCityIdValue"
              :label="item.name"
              :value="item" :key="index">
            </el-option>
          </el-select>

          <el-select clearable v-model="myIncludeArea.city"
                     @clear="myProvinceAndCityClear"
                     value-key="id"
                     @change="myProvinceAndCity" placeholder="请选择市">
            <el-option
              v-for="(item,index) in includeCityValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="包含区">
          <el-select clearable  v-model="myIncludeArea.provinceAndCityAndCounry"
                     @change="includeProvinceAndCityAndCounry"
                     value-key="id"
                     @clear="includeProvinceAndCityAndCounryClear"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in provinceAndCityAndCounryValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>

          <el-select clearable v-model="myIncludeArea.cityAndCounry"
                     @clear="includeCityClear"
                     value-key="id"
                     @change="includeCity" placeholder="请选择市">
            <el-option
              v-for="(item,index) in includeCityAndCounryValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.county" @change="myIncludeCityAndCounty"
                     @clear="myIncludeCityAndCountyClear"
                     value-key="id"
                     placeholder="请选择区/县">
            <el-option
              v-for="(item,index) in includeCountyValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="包含乡镇街道">
          <el-select clearable  v-model="myIncludeArea.provinceAndCityAndCounryAndTown"
                     @change="includeProvinceAndCityAndCounryAndTown"
                     value-key="id"
                     @clear="includeProvinceAndCityAndCounryAndTownClear"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in includeProvinceAndCityAndCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>

          <el-select clearable v-model="myIncludeArea.cityAndCounryAndTown"
                     @clear="includeCityAndCounryAndTownClear"
                     value-key="id"
                     @change="includeCityAndCounryAndTown" placeholder="请选择市">
            <el-option
              v-for="(item,index) in includeCityAndCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.countyAndTown"
                     @change="includeCounryAndTown"
                     @clear="includeCounryAndTownClear"
                     value-key="id"
                     placeholder="请选择区/县">
            <el-option
              v-for="(item,index) in includeCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.town" @change="includeTown"
                     @clear="includeTownClear"
                     value-key="id"
                     placeholder="请选择街道">
            <el-option
              v-for="(item,index) in includeTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="不包含省">
          <el-select clearable  @change="myNotIncludeProvince"
                     @clear="myNotIncludeProvinceClear"
                     value-key="id"
                     v-model="myIncludeArea.notincludeProvince"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in notIncludeProvinceValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="不包含市">
          <el-select clearable  v-model="myIncludeArea.notincludeProvinceAndCity"
                     @change="notIncludeProvinceAndCity"
                     @clear="notIncludeProvinceAndCityClear"
                     value-key="id"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in notIncludeProvinceAndCityIdValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.notincludeCity"
                     @change="myNotIncludeCity"
                     @clear="myNotIncludeCityClear"
                     value-key="id"
                     placeholder="请选择市">
            <el-option
              v-for="(item,index) in notIncludeCityValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="不包含区">
          <el-select clearable  v-model="myIncludeArea.notincludeProvinceAndCityAndCounry"
                     @change="notIncludeProvinceAndCityAndCounry"
                     @clear="notIncludeProvinceAndCityAndCounryClear"
                     value-key="id"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in notIncludeprovinceAndCityAndCounryValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>

          <el-select clearable v-model="myIncludeArea.notincludeCityAndCounry"
                     @change="notIncludeCityAndCounry"
                     @clear="notIncludeCityAndCounryClear"
                     value-key="id"
                     placeholder="请选择市">
            <el-option
              v-for="(item,index) in notincludeCityAndCounryValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.notincludeCounty  "
                     @change="myIncludeCounty"
                     @clear="myIncludeCountyClear"
                     value-key="id"
                     placeholder="请选择区/县">
            <el-option
              v-for="(item,index) in notIncludeCountyValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="不包含乡镇街道">
          <el-select clearable  v-model="myIncludeArea.notincludeProvinceAndCityAndCounryAndTown"
                     @change="notincludeProvinceAndCityAndCounryAndTown"
                     value-key="id"
                     @clear="notincludeProvinceAndCityAndCounryAndTownClear"
                     placeholder="请选择省">
            <el-option
              v-for="(item,index) in notincludeProvinceAndCityAndCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>

          <el-select clearable v-model="myIncludeArea.notincludeCityAndCounryAndTown"
                     @clear="notincludeCityAndCounryAndTownClear"
                     value-key="id"
                     @change="notincludeCityAndCounryAndTown" placeholder="请选择市">
            <el-option
              v-for="(item,index) in notincludeCityAndCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.notincludeCountyAndTown"
                     @change="notincludeCounryAndTown"
                     @clear="notincludeCounryAndTownClear"
                     value-key="id"
                     placeholder="请选择区/县">
            <el-option
              v-for="(item,index) in notincludeCounryAndTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
          <el-select clearable v-model="myIncludeArea.notincludeTown" @change="notincludeTown"
                     @clear="notincludeTownClear"
                     value-key="id"
                     placeholder="请选择街道">
            <el-option
              v-for="(item,index) in notincludeTownValue"
              :label="item.name"
              :value="item" :key="index"
            >
            </el-option>
          </el-select>
        </el-form-item>

      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="myIncludeAreaVisible = false">取消</el-button>
        <el-button type="primary" @click="myAreaSave">提交</el-button>
      </div>
    </el-dialog>

  </section>
</template>

<script>
import {
  searchDictEntitys,
  searchMarkCargos,
  batchStart,
  batchDel,
  getAddresses,
  saveMarkCargo,
  deleteMarkCargoAddressByUseridAndMarkCargoId,
  getMarkCargo,
  getMarkCargoAddresss
} from '../../api/system/MarkCargo';
import { isEmpty } from '../../lib/util';

export default {
  data () {
    return {
      currentIndex: '',
      currentRowId: '', // 当前的ROWID
      currentRow: '', // 当前的ROWID
      tableDataGO: [],
      organization1: '',
      stowageCore1: '',
      cargoType: [], // 大画面的提货类型类型
      cargoTypeValue: '', // 显示值
      isStart: [], // 大画面的类型类型
      isStartValue: '', // 显示值
      searchName: '', // 搜索栏名称
      organizationValue: [], // 调度中心
      stowageValue: [], // 配载中心
      includeProvinceValue: [], // 包含省
      provinceAndCityIdValue: [], // 包含省-有市
      provinceAndCityAndCounryValue: [], // 包含省-有市 -有区
      includeCityValue: [], // 包含城市
      includeCityAndCounryValue: [], // 包含城-区
      includeProvinceAndCityAndCounryAndTownValue: [], // 包含省市区县街道- 选择省后，获取对应的市
      includeCityAndCounryAndTownValue: [], // 包含省市区县街道- 选择市后，获取对应的区街道
      includeCounryAndTownValue: [], // 包含省市区县街道- 选择县后，获取对应的街道
      includeTownValue: [], // 包含省市区县街道- 选择街道后，获取对应的街道
      notincludeProvinceAndCityAndCounryAndTownValue: [], // 不包含省市区县街道- 选择省后，获取对应的市
      notincludeCityAndCounryAndTownValue: [], // 不包含省市区县街道- 选择市后，获取对应的区街道
      notincludeCounryAndTownValue: [], // 不包含省市区县街道- 选择县后，获取对应的街道
      notincludeTownValue: [], // 不包含省市区县街道- 选择街道后，获取对应的街道
      includeCountyValue: [], // 包含区/县
      notIncludeProvinceValue: [], // 不包含省
      notIncludeProvinceAndCityIdValue: [], // 不包含省 有--市
      notIncludeprovinceAndCityAndCounryValue: [], // 不包含省 有--市 --区
      notIncludeCityValue: [], // 不包含城市
      notincludeCityAndCounryValue: [], // 不包含城市有区
      notIncludeCountyValue: [], // 不包含区/县
      stowageCoreCenter2: [],
      searchStowageCoreCenter2: [],
      searchBarOrganization2: [],
      controlCenter2: [],
      searchBarStowageCore: [],

      props: {
        label: 'name',
        value: 'id',
        children: 'children'
      },
      props1: {
        label: 'name',
        value: 'id',
        children: 'children'
      },

      searchStowageCoreprops: {
        label: 'name',
        value: 'id',
        children: 'children'
      },

      searchBarOrgazizationprops: {
        label: 'name',
        value: 'id',
        children: 'children'
      },

      dialogTitle: '新增',
      condition: {
        name: '',
        number: ''
      },

      includeTitle: '新增地址', // 新增地址标题
      sels: [],
      tableData: [],
      total: 0,
      currentPage: 1,
      pageSize: 10,
      sortProp: null,
      sortOrder: 'ascending',
      listLoading: false,
      myMarkCargoVisible: false,
      myIncludeAreaVisible: false,
      submitLoading: false,

      connectionTyperadio: '',
      // 表单数据
      myMarkCargo: {
        'id': null,
        'name': null,
        'type': null,
        'keyword': null,
        'sorts': null,
        'stowageCoreId': null,
        'organizationId': null,
        'addressId': '',
        'remark': null,
        'tableDataGO': [],
        'connectionType': null,
        // 表单数据
        myIncludeArea: {
          'id': null,
          'notincludeProvince': null,
          'notincludeProvinceId': null,

          'notincludeProvinceAndCity': null,
          'notincludeProvinceAndCityId': null,

          'notincludeProvinceAndCityAndCounry': null,
          'notincludeProvinceAndCityAndCounryId': null,

          'notincludeProvinceAndCityAndCounryAndTown': null,
          'notincludeProvinceAndCityAndCounryAndTownId': null,

          'notincludeCity': null,
          'notincludeCityId': null,

          'notincludeCityAndCounry': null,
          'notincludeCityAndCounryId': null,

          'notincludeCityAndCounryAndTown': null,
          'notincludeCityAndCounryAndTownId': null,

          'notincludeCounty': null,
          'notincludeCountyId': null,

          'notincludeCountyAndTown': null,
          'notincludeCountyAndTownId': null,

          'notincludeTown': null,
          'notincludeTownId': null,

          'province': null,
          'provinceId': null,

          'provinceAndCity': null,
          'provinceAndCityId': null,

          'provinceAndCityAndCounry': null,
          'provinceAndCityAndCounryId': null,

          'provinceAndCityAndCounryAndTown': null,
          'provinceAndCityAndCounryAndTownId': null,

          'city': null,
          'cityId': null,

          'cityAndCounry': null,
          'cityAndCounryId': null,

          'cityAndCounryAndTown': null,
          'cityAndCounryAndTownId': null,

          'county': null,
          'countyId': null,

          'countyAndTown': null,
          'countyAndTownId': null,

          'town': null,
          'townId': null,

          'markCargoId': null

        }
      },

      // 表单数据
      myIncludeArea: {
        'id': null,
        'notincludeProvince': null,
        'notincludeProvinceId': null,

        'notincludeProvinceAndCity': null,
        'notincludeProvinceAndCityId': null,

        'notincludeProvinceAndCityAndCounry': '',
        'notincludeProvinceAndCityAndCounryId': null,

        'notincludeCity': null,
        'notincludeCityId': null,

        'notincludeCityAndCounry': null,
        'notincludeCityAndCounryId': null,

        'notincludeCounty': null,
        'notincludeCountyId': null,

        'notincludeTown': null,
        'notincludeTownId': null,

        'province': null,
        'provinceId': null,

        'provinceAndCity': null,
        'provinceAndCityId': null,

        'provinceAndCityAndCounry': null,
        'provinceAndCityAndCounryId': null,

        'city': null,
        'cityId': null,

        'cityAndCounry': null,
        'cityAndCounryId': null,

        'county': null,
        'countyId': null,

        'town': null,
        'townId': null,

        'markCargoId': null

      },

      // 验证规则
      rules: {
        name: [
          {required: true, message: '请输入姓名', trigger: 'blur'},
          {min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur'}
        ],
        connectionType: [
          {required: true, type: 'number', message: '请选择接驳类型', trigger: 'blur'}
        ]
      }
    };
  },
  methods: {
    myProvinceClear () {
      this.myMarkCargo.myIncludeArea.province = null;
      this.myMarkCargo.myIncludeArea.provinceId = null;
    },
    // 包含省有市-  省-选择时触 发 清空
    myIncludeProvinceClear () {
      this.myMarkCargo.provinceAndCity = null;
      this.myMarkCargo.provinceAndCityId = null;
    },
    //  包含省市 里的市 清空
    myProvinceAndCityClear () {
      this.myMarkCargo.myIncludeArea.city = null;
      this.myMarkCargo.myIncludeArea.cityId = null;
    },

    // 清空 --包含省有市有区-  省选择时触 发
    includeProvinceAndCityAndCounryClear () {
      this.myMarkCargo.myIncludeArea.provinceAndCityAndCounry = null;
      this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryId = null;
    },

    //  清空 包含省-有市有区   市 选择时触 发
    includeCityClear () {
      this.myMarkCargo.myIncludeArea.cityAndCounry = null;
      this.myMarkCargo.myIncludeArea.cityAndCounryId = null;
    },
    // 清空  包含省-有市有区   区 选择时触 发
    myIncludeCityAndCountyClear () {
      this.myMarkCargo.myIncludeArea.county = null;
      this.myMarkCargo.myIncludeArea.countyId = null;
    },

    // 清空 --，不包含省
    myNotIncludeProvinceClear () {
      this.myMarkCargo.myIncludeArea.notincludeProvince = null;
      this.myMarkCargo.myIncludeArea.notincludeProvinceId = null;
    },

    // 清空 --不包含省有市-  省-选择时触 发
    notIncludeProvinceAndCityClear () {
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCity = null;
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityId = null;
    },

    // 清空 --不包含省有市 ---市 选择
    myNotIncludeCityClear () {
      this.myMarkCargo.myIncludeArea.notincludeCity = null;
      this.myMarkCargo.myIncludeArea.notincludeCityId = null;
    },
    // 清空  不包含省份有市有区   省选择时触 发
    notIncludeProvinceAndCityAndCounryClear () {
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounry = null;
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryId = null;
    },
    // 清空--不包含城市选择时触 发
    notIncludeCityAndCounryClear () {
      this.myMarkCargo.myIncludeArea.notincludeCityAndCounry = null;
      this.myMarkCargo.myIncludeArea.notincludeCityAndCounryId = null;
    },

    myIncludeCountyClear () {
      this.myMarkCargo.myIncludeArea.notincludeCounty = null;
      this.myMarkCargo.myIncludeArea.notincludeCountyId = null;
    },
    // 赋值--包含省
    myProvince (event) {
      if (this.myMarkCargo.myIncludeArea == null) {
        this.myMarkCargo.myIncludeArea = {};
      }
      if (event) {
        this.myMarkCargo.myIncludeArea.province = event.name;
        this.myMarkCargo.myIncludeArea.provinceId = event.id;
      }
    },

    // 包含省有市-  省-选择时触 发
    myIncludeProvince (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.provinceAndCity = event.name;
        this.myMarkCargo.myIncludeArea.provinceAndCityId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeCityValue = res.data.detailModelList;
          }
        });
      }
    },
    // 赋值 --包含省市 里的市
    myProvinceAndCity (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.city = event.name;
        this.myMarkCargo.myIncludeArea.cityId = event.id;
      }
    },
    // 赋值 --包含省有市有区-  省选择时触 发
    includeProvinceAndCityAndCounry (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.provinceAndCityAndCounry = event.name;
        this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeCityAndCounryValue = res.data.detailModelList;
          }
        });
      }
    },
    // 赋值  包含省-有市有区   市 选择时触 发
    includeCity (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.cityAndCounry = event.name;
        this.myMarkCargo.myIncludeArea.cityAndCounryId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeCountyValue = res.data.detailModelList;
          }
        });
      }
    },
    // 赋值  包含省-有市有区   区 选择时触 发
    myIncludeCityAndCounty (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.county = event.name;
        this.myMarkCargo.myIncludeArea.countyId = event.id;
      }
    },

    // 赋值 --，不包含省
    myNotIncludeProvince (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeProvince = event.name;
        this.myMarkCargo.myIncludeArea.notincludeProvinceId = event.id;
      }
    },

    // 赋值--不包含省有市-  省-选择时触 发
    notIncludeProvinceAndCity (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCity = event.name;
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notIncludeCityValue = res.data.detailModelList;
          }
        });
      }
    },
    // 赋值 --不包含省有市 ---市 选择
    myNotIncludeCity (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeCity = event.name;
        this.myMarkCargo.myIncludeArea.notincludeCityId = event.id;
      }
    },
    // 赋值  不包含省份有市有区   省选择时触 发
    notIncludeProvinceAndCityAndCounry (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounry = event.name;
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notincludeCityAndCounryValue = res.data.detailModelList;
          }
        });
      }
    },
    // 赋值--不包含城市选择时触 发
    notIncludeCityAndCounry (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeCityAndCounry = event.name;
        this.myMarkCargo.myIncludeArea.notincludeCityAndCounryId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notIncludeCountyValue = res.data.detailModelList;
          }
        });
      }
    },

    myIncludeCounty (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeCounty = event.name;
        this.myMarkCargo.myIncludeArea.notincludeCountyId = event.id;
      }
    },

    // 地址重置
    myAddressRest () {
      this.myIncludeArea.provinceId = '';
      this.myIncludeArea.provinceAndCityId = '';
      this.myIncludeArea.cityId = '';
      this.myIncludeArea.provinceAndCityAndCounryId = '';
      this.myIncludeArea.cityAndCounryId = '';
      this.myIncludeArea.countyId = '';
      this.myIncludeArea.provinceAndCityAndCounryAndTown = '';
      this.myIncludeArea.cityAndCounryAndTown = '';
      this.myIncludeArea.countyAndTown = '';
      this.myIncludeArea.town = '';

      this.myIncludeArea.notincludeProvinceId = '';
      this.myIncludeArea.notincludeProvinceAndCityId = '';
      this.myIncludeArea.notincludeCityId = '';
      this.myIncludeArea.notincludeProvinceAndCityAndCounryId = '';
      this.myIncludeArea.notincludeCityAndCounryId = '';
      this.myIncludeArea.notincludeCountyId = '';
      this.myIncludeArea.notincludeProvinceAndCityAndCounryAndTown = '';
      this.myIncludeArea.notincludeCityAndCounryAndTown = '';
      this.myIncludeArea.notincludeCountyAndTown = '';
      this.myIncludeArea.notincludeTown = '';
    },

    getMarkCargoAddresss (id) {
      getMarkCargoAddresss(id).then((res) => {
        if (res.data.successFlg === true) {
          this.tableDataGO = res.data.detailModelList;
          this.currentPage = res.data.currPage;
          this.total = res.data.totalCount;
          this.pageSize = res.data.pageSize;
          this.listLoading = false;
        } else {
          this.$message.error(res.data.errorMsg);
        }
      });
    },

    // 新增时取消短驳时的方法
    cancelAddress () {
      this.myMarkCargoVisible = false;
    },

    // 保存短驳地址
    myAreaSave () {
      if (isEmpty(this.myMarkCargo.myIncludeArea.province) && isEmpty(this.myMarkCargo.myIncludeArea.city) && isEmpty(this.myMarkCargo.myIncludeArea.county) && isEmpty(this.myMarkCargo.myIncludeArea.town) && isEmpty(this.myMarkCargo.myIncludeArea.notincludeProvince) && isEmpty(this.myMarkCargo.myIncludeArea.notincludeCity) && isEmpty(this.myMarkCargo.myIncludeArea.notincludeCounty) && isEmpty(this.myMarkCargo.myIncludeArea.notincludeTown)) {
        return this.$message.error('请至少选择一项地址！');
      }
      let routeFreightNew = '';
      if (this.tableDataGO.length > 0) {
        for (let x = 0; x < this.tableDataGO.length; x++) {
          if (this.currentRowId === this.tableDataGO[x].id) {
            this.tableDataGO.splice(this.currentIndex, 1);
            routeFreightNew = Object.assign({}, this.myMarkCargo.myIncludeArea);
          } else {
            routeFreightNew = Object.assign({}, this.myMarkCargo.myIncludeArea);
          }
        }
      } else {
        routeFreightNew = Object.assign({}, this.myMarkCargo.myIncludeArea);
      }
      this.tableDataGO.push(routeFreightNew);
      this.myIncludeAreaVisible = false;
    },

    // 打开地址界面
    addIncludeArea () {
      this.myAddressRest();
      this.addGetAddress();
      this.currentRowId = 123456789;
      this.includeTitle = '新增地址';
      this.myMarkCargo.myIncludeArea = {};
      this.myIncludeAreaVisible = true;
    },

    // 搜索
    mySearch () {
      // 名称
      let filters = '';

      if (this.searchName !== '' && this.searchName !== null) {
        filters += 'name?' + this.searchName + ';';
      }
      // 范围类型
      if (this.cargoTypeValue !== '' && this.cargoTypeValue !== null) {
        filters += 'type=' + this.cargoTypeValue + ';';
      }

      // 状态
      if (this.isStartValue !== '' && this.isStartValue !== null) {
        filters += 'isStart=' + this.isStartValue + ';';
      }

      if (!isEmpty(this.searchStowageCoreCenter2)) {
        this.stowageCore1 = this.searchStowageCoreCenter2.join(',');
        filters += 'stowageCoreIdLast=' + this.searchStowageCoreCenter2[this.searchStowageCoreCenter2.length - 1] + ';';
      }
      if (!isEmpty(this.searchBarOrganization2)) {
        this.organization1 = this.searchBarOrganization2.join(',');
        filters += 'organizationIdLast=' + this.searchBarOrganization2[this.searchBarOrganization2.length - 1];
      }
      console.log(filters);
      this.getTableData(filters);
    },

    // 搜索栏重置
    myResert () {
      this.searchName = '';
      this.cargoTypeValue = '';
      this.isStartValue = '';
      this.searchStowageCoreCenter2 = [];
      this.searchBarOrganization2 = [];
    },

    // 打开编辑界面
    getEditBYId (index, row) {
      deleteMarkCargoAddressByUseridAndMarkCargoId().then((res) => {
      });
      getMarkCargo([row.id]).then((res) => {
        if (res.data.obj.isStart === 111002001) {
          this.$message.warning('已启用，无法编辑！');
        } else {
          console.log(this.myMarkCargo);
          this.myMarkCargo = Object.assign({}, row);
          this.myMarkCargo.myIncludeArea = {};
          this.getMarkCargoAddresss(row.id);
          this.stowageCoreCenter2 = this.myMarkCargo.stowageCoreId.split(',');
          this.controlCenter2 = this.myMarkCargo.organizationId.split(',');

          this.dialogTitle = '修改';
          this.myMarkCargoVisible = true;
        }
      });
    },

    // 打开短驳地址编辑界面
    getEditAddressBYId (index, row) {
      this.myAddressRest();
      this.addGetAddress();
      this.currentRowId = row.id;
      this.currentRow = row;
      this.currentIndex = index;
      this.dialogTitle = '地址修改';
      this.myMarkCargo.myIncludeArea = Object.assign({}, row);
      this.myIncludeArea = Object.assign({}, row);
      this.myIncludeAreaVisible = true;
    },

    // 删除单条数据操作
    handleDel (index, row) {
      getMarkCargo([row.id]).then((res) => {
        if (res.data.obj.isStart === 111002001) {
          this.$message.warning('已启用，无法删除！');
        } else {
          this.$confirm('确认删除该用户吗?', '提示', {
            type: 'warning'
          }).then(() => {
            this.listLoading = true;
            batchDel([row.id]).then((res) => {
              this.listLoading = false;
              this.$message({
                message: '删除成功！',
                type: 'success'
              });
              this.mySearch();
            });
          }).catch(() => {
          });
        }
      });
    },

    // 删除单条短驳地址数据操作
    handleAddressDel (index, row) {
      row.splice(index, 1);
    },

    // 批量删除
    batchDel () {
      let id = this.sels.map(item => item.id);
      if (id === '' || id == null) {
        this.$message.error('请选择数据！');
        return;
      }
      getMarkCargo(id).then((res) => {
        if (res.data.obj.isStart === 111002001) {
          this.$message.warning('已启用，无法删除！');
        } else {
          this.$confirm('确认删除该用户吗?', '提示', {
            type: 'warning'
          }).then(() => {
            this.listLoading = true;
            batchDel(id).then((res) => {
              this.listLoading = false;
              this.$message({
                message: '删除成功！',
                type: 'success'
              });
              this.mySearch();
            });
          }).catch(() => {
          });
        }
      });
    },

    // 单 条启用
    handleStart (index, row) {
      this.$confirm('确认启用该服务吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let isStart = 111002001;
        batchStart([row.id], isStart).then((res) => {
          this.listLoading = false;
          this.$message({
            message: '启用成功！',
            type: 'success'
          });
          this.mySearch();
        });
      }).catch(() => {
      });
    },

    // 批量启用
    batchStart () {
      let id = this.sels.map(item => item.id);
      if (id === '' || id == null) {
        this.$message.error('请选择数据！');
        return;
      }
      this.$confirm('确认启用该服务吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let isStart = 111002001;
        batchStart(id, isStart).then((res) => {
          this.listLoading = false;
          this.$message({
            message: '启用成功！',
            type: 'success'
          });
          this.mySearch();
        });
      }).catch(() => {
      });
    },

    // 单 条停用
    handleStop (index, row) {
      this.$confirm('确认停用该用户吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let isStart = 111002002;
        batchStart([row.id], isStart).then((res) => {
          this.listLoading = false;
          this.$message({
            message: '停用成功！',
            type: 'success'
          });
          this.mySearch();
        });
      }).catch(() => {
      });
    },

    // 批量停用
    batchStop () {
      let id = this.sels.map(item => item.id);
      if (id === '' || id == null) {
        this.$message.error('请选择数据！');
        return;
      }
      this.$confirm('确认停用该用户吗?', '提示', {
        type: 'warning'
      }).then(() => {
        this.listLoading = true;
        let isStart = 111002002;
        batchStart(id, isStart).then((res) => {
          this.listLoading = false;
          this.$message({
            message: '停用成功！',
            type: 'success'
          });
          this.mySearch();
        });
      }).catch(() => {
      });
    },

    // 新增修改数据提交
    handleSubmit () {
      this.myMarkCargo.stowageCoreId = this.stowageCoreCenter2.join(',');
      this.myMarkCargo.organizationId = this.controlCenter2.join(',');
      this.$refs['myMarkCargo'].validate((valid) => {
        if (valid) {
          this.myMarkCargo.tableDataGO = this.tableDataGO;
          if (this.myMarkCargo.type === '') {
            return this.$message.error('范围类型不能为空');
          }
          if (this.stowageCoreCenter2.length === 0) {
            return this.$message.error('配载中心不能为空');
          }

          if (this.controlCenter2.length === 0) {
            return this.$message.error('调度中心不能为空');
          }
          this.submitLoading = true;
          saveMarkCargo(this.myMarkCargo).then((res) => {
            this.submitLoading = false;
            if (res.data.successFlg === true) {
              this.myMarkCargoVisible = false;
              this.getTableData('');
              this.$message.success('保存/修改成功！');
            } else {
              this.$message.error(res.data.errorMsg);
            }
          });
        } else {
          return false;
        }
      });
      // 删除短驳ID为空的表格
      deleteMarkCargoAddressByUseridAndMarkCargoId().then((res) => {
      });
    },
    // 重置表单
    resetForm () {
      for (let p in this.myMarkCargo) {
        if (this.myMarkCargo[p] instanceof Array) {
          this.myMarkCargo[p] = [];
        } else {
          this.myMarkCargo[p] = null;
        }
        this.stowageCoreCenter2 = [];
        this.controlCenter2 = [];
      }
    },
    // 弹出添加窗体
    handleAdd () {
      this.dialogTitle = '新增';
      this.resetForm();
      deleteMarkCargoAddressByUseridAndMarkCargoId().then((res) => {
      });
      this.myMarkCargoVisible = true;
    },

    // 多选操作
    selsChange (sels) {
      this.sels = sels;
    },
    // 排序操作
    sortChange (o) {
      this.sortProp = o.prop;
      this.sortOrder = o.order;
      this.mySearch();
    },
    // 每页几条操作
    handleSizeChange (val) {
      this.pageSize = val;
      this.mySearch();
    },
    // 第几页操作
    handleCurrentChange (val) {
      this.currentPage = val;
      this.mySearch();
    },
    // 重置查询条件
    resetCondition () {
      for (let p in this.condition) {
        this.condition[p] = null;
      }
    },

    // 获取表格数据
    getTableData (filters) {
      this.listLoading = true;
      searchMarkCargos({
        page: this.currentPage,
        size: this.pageSize,
        filters: filters,
        sorts: '-createDate'
      }).then((res) => {
        if (res.data.successFlg) {
          this.tableData = res.data.detailModelList;
          this.currentPage = res.data.currPage;
          this.total = res.data.totalCount;
          this.pageSize = res.data.pageSize;
          this.listLoading = false;
        } else {
          this.$message.error(res.data.errorMsg);
        }
      });
    },
    // 赋值 -- 包含省市区县街道 - 省选择时触发
    includeProvinceAndCityAndCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryAndTown = event.name;
        this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeCityAndCounryAndTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --包含省市区县街道 -- 省下拉框
    includeProvinceAndCityAndCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryAndTown = null;
      this.myMarkCargo.myIncludeArea.provinceAndCityAndCounryAndTownId = null;
    },
    // 赋值 -- 包含省市区县街道 - 市选择时触发
    includeCityAndCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.cityAndCounryAndTown = event.name;
        this.myMarkCargo.myIncludeArea.cityAndCounryAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeCounryAndTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --包含省市区县街道 -- 市下拉框
    includeCityAndCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.cityAndCounryAndTown = null;
      this.myMarkCargo.myIncludeArea.cityAndCounryAndTownId = null;
    },
    // 赋值 -- 包含省市区县街道 - 县选择时触发
    includeCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.counryAndTown = event.name;
        this.myMarkCargo.myIncludeArea.counryAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.includeTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --包含省市区县街道 -- 县下拉框
    includeCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.countyAndTown = null;
      this.myMarkCargo.myIncludeArea.countyAndTownId = null;
    },
    // 赋值 -- 包含省市区县街道 - 街道选择时触发
    includeTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.town = event.name;
        this.myMarkCargo.myIncludeArea.townId = event.id;
      }
    },
    // 清空 --包含省市区县街道 -- 街道下拉框
    includeTownClear () {
      this.myMarkCargo.myIncludeArea.town = null;
      this.myMarkCargo.myIncludeArea.townId = null;
    },
    // 赋值 -- 不包含省市区县街道 - 省选择时触发
    notincludeProvinceAndCityAndCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryAndTown = event.name;
        this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notincludeCityAndCounryAndTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --不包含省市区县街道 -- 省下拉框
    notincludeProvinceAndCityAndCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryAndTown = null;
      this.myMarkCargo.myIncludeArea.notincludeProvinceAndCityAndCounryAndTownId = null;
    },
    // 赋值 -- 不包含省市区县街道 - 市选择时触发
    notincludeCityAndCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeCityAndCounryAndTown = event.name;
        this.myMarkCargo.myIncludeArea.notincludeCityAndCounryAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notincludeCounryAndTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --不包含省市区县街道 -- 市下拉框
    notincludeCityAndCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.notincludeCityAndCounryAndTown = null;
      this.myMarkCargo.myIncludeArea.notincludeCityAndCounryAndTownId = null;
    },
    // 赋值 -- 不包含省市区县街道 - 县选择时触发
    notincludeCounryAndTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeCountyAndTown = event.name;
        this.myMarkCargo.myIncludeArea.notincludeCountyAndTownId = event.id;
        getAddresses(event.id).then((res) => {
          if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
            this.notincludeTownValue = res.data.detailModelList;
          }
        });
      }
    },
    // 清空 --不包含省市区县街道 -- 县下拉框
    notincludeCounryAndTownClear () {
      this.myMarkCargo.myIncludeArea.notincludeCountyAndTown = null;
      this.myMarkCargo.myIncludeArea.notincludeCountyAndTownId = null;
    },
    // 赋值 -- 不包含省市区县街道 - 县选择时触发
    notincludeTown (event) {
      if (event) {
        this.myMarkCargo.myIncludeArea.notincludeTown = event.name;
        this.myMarkCargo.myIncludeArea.notincludeTownId = event.id;
      }
    },
    // 清空 --不包含省市区县街道 -- 街道下拉框
    notincludeTownClear () {
      this.myMarkCargo.myIncludeArea.notincludeTown = null;
      this.myMarkCargo.myIncludeArea.notincludeTownId = null;
    },
    addGetAddress () {
      // 初始化载入省份
      getAddresses('156').then((res) => {
        if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
          this.includeProvinceValue = res.data.detailModelList;
          this.provinceAndCityIdValue = res.data.detailModelList;
          this.provinceAndCityAndCounryValue = res.data.detailModelList;
          this.includeProvinceAndCityAndCounryAndTownValue = res.data.detailModelList;
          this.notIncludeProvinceValue = res.data.detailModelList;
          this.notIncludeProvinceAndCityIdValue = res.data.detailModelList;
          this.notIncludeprovinceAndCityAndCounryValue = res.data.detailModelList;
          this.notincludeProvinceAndCityAndCounryAndTownValue = res.data.detailModelList;
        }
      });
    }
  },
  // 初始化数据
  mounted () {
    // 初始化载入提/送货类型
    searchDictEntitys('105003').then((res) => {
      if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
        this.cargoType = res.data.detailModelList;
      }
    });

    // 初始化载入开启类型
    searchDictEntitys('111002').then((res) => {
      if (res.data.detailModelList !== '' && res.data.detailModelList !== null) {
        this.isStart = res.data.detailModelList;
      }
    });
    // 初始化载入表格
    this.getTableData('');
    this.$store.commit('initDict');
    this.$store.commit('initOrganizations');
  }
};
</script>

<style lang="less" scoped>

</style>
